import { useEffect } from "react";
import "./index.css";
export default function () {
  useEffect(() => {
    document.querySelector("#btn").addEventListener("click", function (e) {
      e.preventDefault();
      if (
        window.confirm(
          "您即将离开前程无忧官方招聘网站，前往第三方页面。是否确认前往？"
        )
      ) {
        window.location.href = "http://XXXXXXXXXXXXXXXX.com";
      } else {
        return false;
      }
    });
  }, []);

  return (
    <div className="join-wrapper">
      <div className="join-item introduce">
        <div className="arrow-btn"></div>
      </div>
      <div className="join-item ask">
        <div className="deliver-btn" id="btn"></div>
      </div>
    </div>
  );
}
